package com.baoyi.widget;



import android.content.Context;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.baoyi.landscape.R;

public class SpeechView extends LinearLayout{
	  public SpeechView(Context context, String comments, String score) {
          super(context);
          this.setOrientation(VERTICAL);
          mDialogue = new TextView(context);
          mDialogue.setText("最后评论：");
          mDialogue.setTextColor(R.color.heise);
          addView(mDialogue, new LinearLayout.LayoutParams(
                  LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
         
          

          
          lastcomments=new TextView(context);
          lastcomments.setText(comments);
          lastcomments.setTextColor(R.color.heise);
          addView(lastcomments, new LinearLayout.LayoutParams(
                  LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
          
          mTitle = new TextView(context);
          mTitle.setText(score);
         // mTitle.setGravity(Gravity.RIGHT);
          mTitle.setTextColor(R.color.heise);
          addView(mTitle, new LinearLayout.LayoutParams(
                  LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
    
          
         
      }

      /**
       * Convenience method to set the title of a SpeechView
       */
      public void setTitle(String title) {
          mTitle.setText(title);
      }

      /**
       * Convenience method to set the dialogue of a SpeechView
       */
      public void setDialogue(String words) {
          mDialogue.setText(words);
      }

      private TextView mTitle;
      private TextView mDialogue;
      private TextView lastcomments;
  }

